'''
Created on 05/05/2010

@author: emlyn
'''
from google.appengine.ext import db
from PSStudent import PSStudent
from DataClass import SiteUser

class PSLesson(db.Model):
    user = db.ReferenceProperty(SiteUser)
    psstudent = db.ReferenceProperty(PSStudent)
    status = db.IntegerProperty() # This is an index into PSLesson.GetStatuses()
    dayofweek = db.IntegerProperty() # 0 to 6
    timeofday = db.TimeProperty()
    durationmins = db.FloatProperty()
    costcents = db.IntegerProperty()
    notes = db.StringProperty(multiline=True)

    def GetStatuses(cls):
        return ['Pending', 'Cancelled', 'Taught']
    GetStatuses = classmethod(GetStatuses)
    